.class public Lcom/brixd/niceapp/community/model/RankingUserModel;
.super Ljava/lang/Object;
.source "RankingUserModel.java"

# interfaces
.implements Ljava/io/Serializable;


# static fields
.field private static final serialVersionUID:J = -0x16e557447f928f58L


# instance fields
.field public bgColor:Ljava/lang/String;

.field public career:Ljava/lang/String;

.field public flowers:I

.field public gender:Ljava/lang/String;

.field public iconUrl:Ljava/lang/String;

.field public identity:I

.field public name:Ljava/lang/String;

.field public userId:I


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 9
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static parseRankingUserModels(Lorg/json/JSONArray;)Ljava/util/ArrayList;
    .registers 6
    .param p0, "ja"    # Lorg/json/JSONArray;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/json/JSONArray;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/RankingUserModel;",
            ">;"
        }
    .end annotation

    .prologue
    .line 16
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 17
    .local v3, "rankingUserModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/RankingUserModel;>;"
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_6
    invoke-virtual {p0}, Lorg/json/JSONArray;->length()I

    move-result v4

    if-ge v0, v4, :cond_5b

    .line 18
    invoke-virtual {p0, v0}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v1

    .line 19
    .local v1, "rankingUserJson":Lorg/json/JSONObject;
    new-instance v2, Lcom/brixd/niceapp/community/model/RankingUserModel;

    invoke-direct {v2}, Lcom/brixd/niceapp/community/model/RankingUserModel;-><init>()V

    .line 21
    .local v2, "rankingUserModel":Lcom/brixd/niceapp/community/model/RankingUserModel;
    const-string v4, "id"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    iput v4, v2, Lcom/brixd/niceapp/community/model/RankingUserModel;->userId:I

    .line 22
    const-string v4, "name"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/brixd/niceapp/community/model/RankingUserModel;->name:Ljava/lang/String;

    .line 23
    const-string v4, "career"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/brixd/niceapp/community/model/RankingUserModel;->career:Ljava/lang/String;

    .line 24
    const-string v4, "flowers"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    iput v4, v2, Lcom/brixd/niceapp/community/model/RankingUserModel;->flowers:I

    .line 25
    const-string v4, "avatar_url"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/brixd/niceapp/community/model/RankingUserModel;->iconUrl:Ljava/lang/String;

    .line 26
    const-string v4, "bg_color"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/brixd/niceapp/community/model/RankingUserModel;->bgColor:Ljava/lang/String;

    .line 27
    const-string v4, "gender"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/brixd/niceapp/community/model/RankingUserModel;->gender:Ljava/lang/String;

    .line 28
    const-string v4, "identity"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    iput v4, v2, Lcom/brixd/niceapp/community/model/RankingUserModel;->identity:I

    .line 30
    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 17
    add-int/lit8 v0, v0, 0x1

    goto :goto_6

    .line 33
    .end local v1    # "rankingUserJson":Lorg/json/JSONObject;
    .end local v2    # "rankingUserModel":Lcom/brixd/niceapp/community/model/RankingUserModel;
    :cond_5b
    return-object v3
.end method
